{% extends 'base.html' %}

{% block title %}橘子问答-登陆{% endblock title %}

{% block content %}
    <div class="row mt-4">
        <div class="col-md-4">
        </div>
        <div class="col-md-4">
            <form action="{{ url_for('user.login') }}" method="post">
                <div class="form-group">
                    <label for="exampleInputEmail1">邮箱</label>
                    <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" name="email" value="{{request.form.email}}">
                    <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
                </div>
                <div class="form-group">
                    <label for="exampleInputPassword1">密码</label>
                    <input type="password" class="form-control" id="exampleInputPassword1" name="password">
                </div>
                <div class="form-group">
                    {% for  msg in  get_flashed_messages() %} 
                        <div class="alert alert-danger alert-dismissible fade show" role="alert">
                            <strong>Tips:</strong> 
                            {{msg}}
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                            </button>
                        </div>  
                    {% endfor %}
                </div>
                <button type="submit" class="btn btn-primary btn-block">立即登陆</button>
            </form>
        </div>
        <div class="col-md-4">
        </div>
    </div>
{% endblock content %}
